window = {
    document: {
        cookie: "",
        createElement: function (tag) {
            if (tag == "canvas") {
                return canvas;
            } else if (tag == "caption") {
                return {tagName: "CAPTION"};
            }
        },
        getElementById: function (a, b, c, d) {
            return false;
        },
        getElementsByName: function (a, b, c, d) {
            return false;
        },
        getElementsByTagName: function (a, b, c, d) {
            return false;
        },
        getElementsByClassName: function (a, b, c, d) {
            return false;
        },
        title: "",
    },
    moveBy: function () {
    },
    moveTo: function () {
    },
    open: function () {
    },
    dispatchEvent: function () {
        return true;
    },
    screen: {availHeight: 824, availWidth: 1536},
    location: {
        host: "www.zhipin.com",
        hostname: "www.zhipin.com",
        href: "https://www.zhipin.com/c101280100-p100101/",
        origin: "https://www.zhipin.com",
        pathname: "/c101280100-p100101/",
        toString: function () {
            return "https://www.zhipin.com/";
        },
    },
    decodeURI: decodeURI,
    OfflineAudioContext: function () {
        (this.createOscillator = function () {
            return {
                frequency: {
                    setValueAtTime: function () {
                    },
                },
                connect: function () {
                },
                start: function () {
                },
            };
        }),
            (this.createDynamicsCompressor = function () {
                return {
                    threshold: {
                        setValueAtTime: function () {
                        },
                    },
                    setValueAtTime: function () {
                    },
                    knee: {
                        setValueAtTime: function () {
                        },
                    },
                    ratio: {
                        setValueAtTime: function () {
                        },
                    },
                    reduction: {
                        setValueAtTime: function () {
                        },
                    },
                    attack: {
                        setValueAtTime: function () {
                        },
                    },
                    release: {
                        setValueAtTime: function () {
                        },
                    },
                    connect: function () {
                    },
                };
            }),
            (this.startRendering = function () {
            });
    },
    history: {length: 2, scrollRestoration: "auto", state: null},
    // outerHeight: 824,
    // innerHeight: 150,
    // outerWidth: 1536,
    // innerWidth: 0,
    outerHeight: 28,
    innerHeight: 0,
    outerWidth: 160,
    innerWidth: 0,
    Math: Math,
    Date: Date,
    encodeURIComponent: encodeURIComponent,
    RegExp: RegExp,
    length: 0,
    ScreenOrientation: function () {
    },
    onmessage: null,
    speechSynthesis: {
        paused: false,
        pending: false,
        speaking: false,
        getVoices: function () {
        },
        speak: function () {
        },
    },
    performance:{
        "timeOrigin": 1637049022844.9,
        "timing": {
            "connectStart": 1637049022910,
            "navigationStart": 1637049022844,
            "loadEventEnd": 1637049029507,
            "domLoading": 1637049023969,
            "secureConnectionStart": 1637049022944,
            "fetchStart": 1637049022854,
            "domContentLoadedEventStart": 1637049025790,
            "responseStart": 1637049023516,
            "responseEnd": 1637049023582,
            "domInteractive": 1637049025790,
            "domainLookupEnd": 1637049022910,
            "redirectStart": 0,
            "requestStart": 1637049023079,
            "unloadEventEnd": 1637049023701,
            "unloadEventStart": 1637049023669,
            "domComplete": 1637049029506,
            "domainLookupStart": 1637049022906,
            "loadEventStart": 1637049029506,
            "domContentLoadedEventEnd": 1637049025912,
            "redirectEnd": 0,
            "connectEnd": 1637049023078
        },
        "navigation": {
            "type": 1,
            "redirectCount": 0
        }
    },
    addEvenetListener:function (){
        return {
            toString: function () {
                return "function addEvenetListener() { [native code] }";
            },
        }
    },
    MediaEncryptedEvent:function (){
        return {
            toString: function () {
                return "function MediaEncryptedEvent() { [native code] }";
            },
        }
    },
    HTMLFrameSetElement:function (){
        return {
            toString: function () {
                return "function HTMLFrameSetElement() { [native code] }";
            },
        }
    },
    CDATASection:function (){
        return {
            toString: function () {
                return "function CDATASection() { [native code] }";
            },
        }
    },
    SVGGraphicsElement:function (){
        return {
            toString: function () {
                return "function HTMLFrameSetElement() { [native code] }";
            },
        }
    },
    DOMParser:function (){
        return {
            toString: function () {
                return "function DOMParser() { [native code] }";
            },
        }
    },
    isFinite:function (){
        return {
            toString: function () {
                return "function isFinite() { [native code] }";
            },
        }
    },
    PerformancePaintTiming:function (){
        return {
            toString: function () {
                return "function PerformancePaintTiming() { [native code] }";
            },
        }
    },
    Path2D:function (){
        return {
            toString: function () {
                return "function Path2D() { [native code] }";
            },
        }
    },
    SourceBuffer: function () {
        return {
            mode: "",
            appendWindowStart: "",
            audioTracks: "",
            buffered: "",
            textTracks: "",
            toString: function () {
                return "function SourceBuffer() { [native code] }";
            },
        };
    },
    XMLHttpRequest: function () {
        return {
            readyState: "",
            response: "",
            responseText: "",
            responseURL: "",
            responseXML: "",
            statusText: "",
            toString: function () {
                return "function XMLHttpRequest() { [native code] }";
            },
        };
    },
    SpeechSynthesisUtterance: function () {
    },
    toString: function () {
        return "[object Window]";
    },
};
scrollBy = function () {
};
scrollBy.toString = function () {
    return "function scrollBy() { [native code] }";
};
window.scrollBy = scrollBy;
scrollTo = function () {
};
scrollTo.toString = function () {
    return "function scrollTo() { [native code] }";
};
window.scrollTo = scrollTo;
window.open.toString = function () {
    return "function open() { [native code] }";
};
OfflineAudioContext = window.OfflineAudioContext;
canvas = {
    getContext: function () {
        return CanvasRenderingContext2D;
    },
    toDataURL: function () {
        // 实际为canvas画布填充了图片
        return "";
    },
};
CanvasRenderingContext2D = {
    fillRect: function () {
    },
    fillText: function () {
    },
};
localStorage = {
    removeItem: function (key) {
        delete this[key];
    },
    getItem: function (key) {
        return this[key] ? this[key] : null;
    },
    setItem: function (key, value) {
        this[key] = "" + value;
    },
};
sessionStorage = {};
document = window.document;
window.navigator = navigator = {
    cookieEnabled: true,
    language: "zh-CN",
    appCodeName: "Mozilla",
    appName: "Netscape",
    userAgent:
        "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36",
    appVersion:
        "5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36",
};
window.sessionStorage = sessionStorage;
window.localStorage = localStorage;
setInterval = window.setInterval = function () {
    debugger;
};
setInterval.toString = function () {
    return "function setInterval() { [native code] }";
};
setTimeout = window.setTimeout = function () {
};
setTimeout.toString = function () {
    return "function setTimeout() { [native code] }";
};
clearTimeout = window.clearTimeout = function () {
};
clearTimeout.toString = function () {
    return "function clearTimeout() { [native code] }";
};
top = window.top = windowself = window.self = window;
window.window = window;
child_process = undefined;
closed = {__proto__: (1 >> 3 > 4)["__proto__"]};
screenTop = {__proto__: (2)["__proto__"]};
Function.prototype.toString = function () {
    return "function () { [native code] }";
};
Object.keys(window).forEach((property) => {
    try {
        if (typeof global[property] === "undefined") {
            global[property] = window[property];
        }
    } catch (e) {
        // console.log(e);
    }
});
global = window;
global.window = window;
global = undefined;
process.argv = undefined;